perm filename TMP1[MF,ALS] blob sn#757777 filedate 1984-06-21 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002
C00004 ENDMK
C⊗;

@p
@<Subroutines for encoding characters@>
@#
function do_char:boolean;
label 1,2,3,4,9997,9998,9999;
var o:eight_bits; {operation code of the current command}
@!p,@!q:integer; {parameters of the current command}
begin {we've already scanned the |boc|}
do_char←true;
while true do @<Translate the next command in the \.{GF} file;
		|goto 9999| if it was |eoc|;
		|goto 9998| if premature termination is needed@>;
9998: print_ln('!'); do_char←false; goto 9997;
9999:
@<Remove white rows and columns@>;
@<Encode the character@>;
9997: end;

@ This is the main command loop.

@d error(#)==begin print(a:1,': ! ',#); print_nl; end

@<Translate the next command...@>=
begin a←cur_loc;
o←get_byte; p←first_par(o);
if eof(gf_file) then bad_gf('the file ended prematurely');
@.the file ended prematurely@>
@<Translate command |o|@>;
end